package com.chb.composite;

/**
 * @author chihb
 * @create-time 2024/10/23 20:38
 * @description
 */
public abstract class MenuComponent {

    protected String name;
    protected int level;

    void add(MenuComponent menuComponent){
        throw new UnsupportedOperationException();
    }
    void remove(MenuComponent menuComponent){
        throw new UnsupportedOperationException();
    }
    MenuComponent getChild(int index){
        throw new UnsupportedOperationException();
    }
    String getName(){
        return name;
    }
    void print(){
        throw new UnsupportedOperationException();
    }

}
